<?php $this->_element('header'); ?>

<!-- core -->
<div id="core" class="clearfix">
  <div class="container clearfix">

    <!-- 左侧栏 -->

    <div id="sidebar" class="left">

      <?php $this->_control('Homepage_Projects'); ?>

      <?php $this->_control('Homepage_SVNUpdates'); ?>

    </div>

    <!-- /左侧栏 -->

    <!-- 右侧栏 -->

    <div id="col2" class="right contents">

      <?php $this->_block('contents'); ?><?php $this->_endblock(); ?>

      <?php $this->_control('Homepage_Calendar'); ?>

      <!-- 论坛文章 -->
      <div class="threads contents clearfix">
        <div class="left p50">

          <!-- 最新内容 -->

          <?php $this->_control('Forum_Threads', 'newbie_threads', array(
              'order'  => 'dateline DESC',
              'where'  => array('fid = 20'),
              'label'  => '新手入门新帖',
              'width'  => 37,
          )); ?>

          <!-- /热点 -->
        </div>

        <div class="right p50">

          <!-- 精选内容 -->

          <?php $this->_control('Forum_Threads', 'pro_threads', array(
              'order'  => 'dateline DESC',
              'where'  => array('fid = 38'),
              'label'  => '高级应用新帖',
              'width'  => 39,
          )); ?>

          <!-- 精选内容 -->
        </div>

      </div>

      <div class="threads contents clearfix">
        <div class="left p50">

          <!-- 热点 -->

          <?php $this->_control('Forum_Threads', 'latest_threads', array(
              'order'  => 'replies DESC',
              'where'  => array('moderated <= 0 AND dateline > ?', CURRENT_TIMESTAMP - 86400 * Q::ini('appini/homepage/forum_latest_threads_days')),
              'label'  => '近期热点',
              'width'  => 37,
          )); ?>

          <!-- /热点 -->
        </div>

        <div class="right p50">

          <!-- 精选内容 -->

          <?php $this->_control('Forum_Threads', 'picked_threads', array(
              'order'  => 'lastpost DESC',
              'where'  => array('dateline > ? AND digest > 0', CURRENT_TIMESTAMP - 86400 * Q::ini('appini/homepage/forum_picked_threads_days')),
              'label'  => '最新精选内容',
              'width'  => 39,
          )); ?>

          <!-- 精选内容 -->
        </div>

      </div>
      <!-- /论坛文章 -->

    </div>
    <!-- /右侧栏 -->

  </div>
</div>
<!-- /core -->

<?php $this->_control('footer'); ?>


